#include <stdio.h> 
int main()
{
	int m = 0, n = 0;
	scanf("%d %d", &m, &n);
	int min = m < n ? m : n;
	int ret = 1;
	for ( int i = 2; i <= min / 2; i++ ) {
		if ( m % i == 0 && n % i == 0 ) {
			ret = 0;
			break;
		}
	}
	printf("%s", ret == 1 ? "Yes" : "No");
	return 0;
}
